package cn.stylefeng.guns.modular.deduct.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;

/**
 * <p>
 * 扣费记录表
 * </p>
 *
 * @author liuqiang
 * @since 2020-02-09
 */
@TableName("t_deduct")
public class Deduct implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 电话
     */
    @TableField("phone")
    private String phone;

    /**
     * 用户id
     */
    @TableField("user_id")
    private Integer userId;

    /**
     * 用户姓名
     */
    @TableField("user_name")
    private String userName;

    /**
     * 用户类型 0:学生 1:老师 2:助教
     */
    @TableField("user_type")
    private Integer userType;

    /**
     * 课程名称
     */
    @TableField("course_name")
    private String courseName;

    /**
     * 课程id
     */
    @TableField("course_id")
    private String courseId;

    /**
     * 课程类型
     */
    @TableField("course_type")
    private String courseType;

    /**
     * 时长(分钟)
     */
    @TableField("duration")
    private Integer duration;

    /**
     * 单价(分）
     */
    @TableField("price")
    private BigDecimal price;

    /**
     * 总计费用(分)
     */
    @TableField("total_price")
    private BigDecimal totalPrice;

    /**
     * 余额
     */
    @TableField("balance")
    private BigDecimal balance;

    /**
     * 扣费人
     */
    @TableField("deducter")
    private String deducter;

    /**
     * 扣费时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getCourseId() {
        return courseId;
    }

    public void setCourseId(String courseId) {
        this.courseId = courseId;
    }

    public String getCourseType() {
        return courseType;
    }

    public void setCourseType(String courseType) {
        this.courseType = courseType;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getBalance() {
        return balance;
    }

    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }

    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }

    public String getDeducter() {
        return deducter;
    }

    public void setDeducter(String deducter) {
        this.deducter = deducter;
    }

    @Override
    public String toString() {
        return "Deduct{" +
                "id=" + id +
                ", phone='" + phone + '\'' +
                ", userId=" + userId +
                ", userName='" + userName + '\'' +
                ", userType=" + userType +
                ", courseName='" + courseName + '\'' +
                ", courseId=" + courseId +
                ", courseType='" + courseType + '\'' +
                ", duration=" + duration +
                ", price=" + price +
                ", totalPrice=" + totalPrice +
                ", deducter='" + deducter + '\'' +
                ", createTime=" + createTime +
                '}';
    }
}
